//
//  QDCyclePictureView.m
//  simulateQuickDoctor
//
//  Created by 胡卓 on 2017/3/24.
//  Copyright © 2017年 PipiXia. All rights reserved.
//

#import "QDCyclePictureView.h"
#import <SDCycleScrollView.h>
#import "QDNetworkTool.h"
#import "QDCyclePicModel.h"
#import <Masonry.h>
#import <YYModel.h>
#import "AdvertisingScrollView.h"




@interface QDCyclePictureView ()

//图片模型
@property(nonatomic,strong) NSArray *picturesModel;
@end

@implementation QDCyclePictureView



-(instancetype) initWithCoder:(NSCoder *)aDecoder {
    
    if(self = [super initWithCoder:aDecoder]){
        [self seCycleView];
    }
    return self;
}

#pragma mark - 加载图片轮播

-(void) seCycleView {
    
    NSArray *imagesArray = @[@"http://iosapi.itcast.cn/images/4316336854579796.jpg",@"http://iosapi.itcast.cn/images/4315639523829152.jpg",@"http://iosapi.itcast.cn/images/3429603970515530.jpg"];
    
    AdvertisingScrollView *scrollView = [[AdvertisingScrollView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height)];
    
    [scrollView initializationUIWithDataArray:imagesArray];
    
    [scrollView setAnimationDuration:1.5];
    [self addSubview:scrollView];
    
}

@end
